From: Florian Müllner Date: Mon, 18 Jul 2022 18:47:47 +0000 (+0200) Subject: rfkill: Consider HasAirplaneMode X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~461^2^2~238 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e062e96ae6c09bc4d981a491af8a986d5c451fa5;p=gnome-shell.git rfkill: Consider HasAirplaneMode `ShouldShowAirplaneMode` only considers whether airplane mode should be shown for the form factor, not whether there are any actual kill switches available. That's tracked in a separate property, `HasAirplaneMode`. Take that into account for our `:show-airplane-mode` property, so that it reflects when airplane mode should and *can* be shown. Right now we only show airplane mode when it is enabled (and therefore available), but this will change in the future. Part-of: --- diff --git a/data/dbus-interfaces/org.gnome.SettingsDaemon.Rfkill.xml b/data/dbus-interfaces/org.gnome.SettingsDaemon.Rfkill.xml index 628b17ff9..bde65f957 100644 --- a/data/dbus-interfaces/org.gnome.SettingsDaemon.Rfkill.xml +++ b/data/dbus-interfaces/org.gnome.SettingsDaemon.Rfkill.xml @@ -1,6 +1,7 @@ + diff --git a/js/ui/status/rfkill.js b/js/ui/status/rfkill.js index 332d1643f..798d771cd 100644 --- a/js/ui/status/rfkill.js +++ b/js/ui/status/rfkill.js @@ -60,7 +60,7 @@ const RfkillManager = GObject.registerClass({ } get show_airplane_mode() { - return this._proxy.ShouldShowAirplaneMode; + return this._proxy.HasAirplaneMode && this._proxy.ShouldShowAirplaneMode; } /* eslint-enable camelcase */ @@ -73,6 +73,7 @@ const RfkillManager = GObject.registerClass({ case 'HardwareAirplaneMode': this.notify('hw-airplane-mode'); break; + case 'HasAirplaneMode': case 'ShouldShowAirplaneMode': this.notify('show-airplane-mode'); break;